package me.zhulu.dubbo.pagination2;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: herosea
 * Date: 14-5-30
 * Time: 上午10:32
 * To change this template use File | Settings | File Templates.
 */
public class PageServiceImpl implements PageService {

    @Override
    public PagedList page(PageInfo pageInfo) {

        List<String> list = new ArrayList<String>(10);
        for (int i = 0; i < 10; i++) {
            list.add(String.valueOf(i));
        }
        DefaultPagedList pagedList = new DefaultPagedList(list, pageInfo, 1000);

        System.out.println(pageInfo);
        System.out.println(pagedList);
        return pagedList;
    }
}
